<?php
//smarty 输出
function display($tpl_path,$data)
{
	//smarty路径
	$smart_path = SERVER_ROOT."smarty-3.1.29/libs/Smarty.class.php";
	require($smart_path);
	$smarty = new Smarty;
	
	$smarty->setTemplateDir(SERVER_ROOT.'templates/')
	->setCompileDir(SERVER_ROOT.'templates_c/')
	->setPluginsDir(SERVER_ROOT.'smarty-3.1.29/libs/plugins/')
	->setCacheDir(SERVER_ROOT.'smarty-3.1.29/libs/cache/')
	->setConfigDir(SERVER_ROOT.'smarty-3.1.29/libs/configs');
	$smarty->left_delimiter = '<{';
	$smarty->right_delimiter = '}>';
	$smarty->assign("data",$data);
	$smarty->display($tpl_path);
}

?>